From: Claudio Cambra Date: Fri, 28 Feb 2025 08:26:08 +0000 (+0800) Subject: gui/tray: Do not generate JPEG images in async image response for macOS X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~16^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=0ccf0087e41530516827abcb8ef5e54e36fe3c3a;p=nextcloud-desktop.git gui/tray: Do not generate JPEG images in async image response for macOS We are seeing libjpeg related crashes in our packaged version for macOS. Until we are able to resolve this in the packaging, do not generate JPEG-based images Signed-off-by: Claudio Cambra --- diff --git a/src/gui/tray/asyncimageresponse.cpp b/src/gui/tray/asyncimageresponse.cpp index fb1bf8159..89b1f049e 100644 --- a/src/gui/tray/asyncimageresponse.cpp +++ b/src/gui/tray/asyncimageresponse.cpp @@ -12,12 +12,13 @@ * for more details. */ +#include "asyncimageresponse.h" + #include #include #include -#include "asyncimageresponse.h" -#include "usermodel.h" +#include "accountmanager.h" AsyncImageResponse::AsyncImageResponse(const QString &id, const QSize &requestedSize) { @@ -135,6 +136,12 @@ void AsyncImageResponse::slotProcessNetworkReply() } else { processNextImage(); } +#ifdef Q_OS_MACOS + // NOTE: We are facing issues with JPEGs at the moment on macOS with our Qt 6.8.2-based release. + // Do not create previews for JPEGs to prevent crashing. + } else if (imageData.startsWith(QByteArrayLiteral("\xFF\xD8")) && imageData.endsWith(QByteArrayLiteral("\xFF\xD9"))) { + processNextImage(); +#endif } else { setImageAndEmitFinished(QImage::fromData(imageData)); }